﻿@{
    ViewBag.Title = "用户列表";
    Layout = "~/Views/Shared/_FrameLayout.cshtml";
    string departmentId = Request["departmentId"];
    string v = System.Configuration.ConfigurationManager.AppSettings["version"];
}
@section scripts
{
<script src="~/Scripts/page/wike.user.dialog.js?v=@v"></script>
    <script>
        $(document).ready(function () {
            var config = {
                title: '用户列表',
                url: '@Url.Action("GetList")' + '?DepartmentId=@departmentId',
                colNames: ['主键', '用户名', '员工编号','真实姓名', '所属部门', '手机', '邮箱', '状态'],
                colModel: [
                    { name: 'Id', index: 'Id', width: 60, key: true, hidden: true },
                    { name: 'UserName', index: 'UserName', width: 30 },
                    { name: 'UserCode', index: 'UserCode', width: 30 },
                    { name: 'TrueName', index: 'TrueName', width: 30 },
                    { name: 'DepartmentName', index: 'DepartmentName', width: 60, sortable: false },
                    { name: 'Mobile', index: 'Mobile', width: 30 },
                    { name: 'Email', index: 'Email', width: 60 },
                    {
                        name: 'UserStatus', index: 'UserStatus', width: 20, align: 'center',
                        formatter: function (cellValue, options, rowObject) {
                            return cellValue === 1 ? "<span class='layui-btn layui-btn-mini'>在职</span>" : "<span class='layui-btn layui-btn-danger layui-btn-mini'>离职</span>";
                        }
                    }
                ],
                sortname: 'UserCode'
            };
            WikeGrid.Load(config);


        });
    </script>
}



<form id="searchToolBar" class="alert alert-info form-inline toolbarsearch" action="">
    <div class="form-group">
        <label for="UserName">登录名</label>
        <input type="text" id="UserName" name="UserName" autocomplete="off" class="form-control" placeholder="请输入关键字" />

    </div>
    <div class="form-group">
        <label for="TrueName">真实姓名</label>
        <input type="text" id="TrueName" name="TrueName" autocomplete="off" class="form-control" placeholder="请输入申请人" />
    </div>
    
    @*<div class="form-group">
            <label for="Person">申请人</label>
            <input type="text" id="Person" name="Person" autocomplete="off" class="form-control" placeholder="请输入申请人" />
        </div>
        <div class="form-group">
            <label for="Days">天数</label>
            <input type="text" id="Days" name="Days" autocomplete="off" class="form-control" placeholder="请输入天数" />
        </div>
        <div class="form-group">
            <label for="DaysType">请假类型</label>

            <select class="form-control" id="DaysType" name="DaysType">
                <option value=""></option>
                <option value="事假">事假</option>
                <option value="病假">病假</option>
                <option value="调休">调休</option>
            </select>
        </div>*@
    <button class="btn btn-danger" id="btnSearch" type="button">
        <i class="fa fa-search"></i>查询
    </button>
    <button class="btn btn-default" data-url="@Url.Action("FrameAdd")?departmentId=@departmentId" id="btnAdd" type="button">
        <i class="fa fa-plus"></i>添加
    </button>
    <button class="btn btn-default" data-url="@Url.Action("FrameEdit")?departmentId=@departmentId" id="btnEdit" type="button">
        <i class="fa fa-reorder"></i> 编辑
    </button>

    <button class="btn btn-default" data-url="@Url.Action("Delete")" id="btnDelete" type="button">
        <i class="fa fa-remove"></i> 删除
    </button>
</form>
<div class="jqGrid_wrapper">
    <table id="table_list"></table>
    <div id="pager_list"></div>
</div>

